﻿<UserControl x:Class="Ucodia.LocaliZune.SettingsEditor.ConfigurationView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500">
    <Grid>
        <Grid.Resources>
            <Style TargetType="Button">
                <Setter Property="Foreground" Value="Black"/>
                <Setter Property="FontWeight" Value="DemiBold"/>
            </Style>
            <Style TargetType="Label">
                <Setter Property="Foreground" Value="DarkGray"/>
                <Setter Property="FontWeight" Value="DemiBold"/>
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="35"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="6"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="6"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="32"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Label Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0"
               HorizontalAlignment="Stretch"
               Content="ACCOUNT LOCATION"/>
        <ComboBox Grid.Column="0"  Grid.ColumnSpan="2" Grid.Row="1"
                  HorizontalAlignment="Stretch"
                  ItemsSource="{Binding Path=GeographicalLocations}" DisplayMemberPath="FriendlyName"
                  SelectedValue="{Binding Path=NationCode}" SelectedValuePath="Nation">
            <ComboBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel/>
                </ItemsPanelTemplate>
            </ComboBox.ItemsPanel>
        </ComboBox>

        <Label Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3"
               HorizontalAlignment="Stretch"
               Content="ZUNE SOFTWARE PATH"/>
        <TextBox Grid.Column="0" Grid.Row="4"
                 HorizontalAlignment="Stretch"
                 Text="{Binding Path=ApplicationPath}" IsReadOnly="True"/>
        <Button Grid.Column="1" Grid.Row="4"
                Margin="10,0,0,0" HorizontalAlignment="Stretch"
                Content="..." Command="{Binding Path=SelectFileCommand}"/>

        <Label Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6"
               HorizontalAlignment="Stretch"
               Content="LOCALIZUNE SHUTDOWN DELAY"/>
        <TextBox Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="7"
                 HorizontalAlignment="Left" Width="50"
                 Text="{Binding Path=ShutdownDelay, UpdateSourceTrigger=PropertyChanged}"/>

        <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="9"
                    Height="32" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Width="70" Content="SAVE" Command="{Binding Path=SaveCommand}"/>
        </StackPanel>
        
    </Grid>
</UserControl>
